using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class GIAODAN_QUANHEGIATOCModel : ObjModel<GIAODAN_QUANHEGIATOC>, IModelConverter
	{

		#region Constructor

		public GIAODAN_QUANHEGIATOCModel()
			: base()
		{
		}

		public GIAODAN_QUANHEGIATOCModel(GIAODAN_QUANHEGIATOC obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _magiaodan;

		private System.Guid? _magiatoc;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN
		{
			get
			{
				return _magiaodan;
			}
			set
			{
				_magiaodan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIATOC
		{
			get
			{
				return _magiatoc;
			}
			set
			{
				_magiatoc = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(GIAODAN_QUANHEGIATOCModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<GIAODAN_QUANHEGIATOC>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override GIAODAN_QUANHEGIATOC ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator GIAODAN_QUANHEGIATOCModel(GIAODAN_QUANHEGIATOC obj)
		{
			return new GIAODAN_QUANHEGIATOCModel(obj);
		}
		public static implicit operator GIAODAN_QUANHEGIATOC(GIAODAN_QUANHEGIATOCModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
